projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
49c0ff2
)
Handle integer indices for eshell variables (Bug#26055)
author
Noam Postavsky
<npostavs@gmail.com>
Fri, 9 Jun 2017 23:40:38 +0000
(19:40 -0400)
committer
Noam Postavsky
<npostavs@gmail.com>
Sat, 17 Jun 2017 04:10:33 +0000
(
00:10
-0400)
* lisp/eshell/esh-var.el (eshell-index-value): Convert index to number
if it's been marked as one, just like `eshell-lisp-command' does.
lisp/eshell/esh-var.el
patch
|
blob
|
history
diff --git
a/lisp/eshell/esh-var.el
b/lisp/eshell/esh-var.el
index fe1f1188c88b8521645489e2dfdbee2b000003cf..cdd05bd7e9a4d1f381d3e8ca19213d9c05ca1d58 100644
(file)
--- a/
lisp/eshell/esh-var.el
+++ b/
lisp/eshell/esh-var.el
@@
-563,6
+563,8
@@
For example, to retrieve the second element of a user's record in
(defun eshell-index-value (value index)
"Reference VALUE using the given INDEX."
+ (when (and (stringp index) (get-text-property 0 'number index))
+ (setq index (string-to-number index)))
(if (stringp index)
(cdr (assoc index value))
(cond